bitkeeper revision 1.267.1.1 (3f055a3dM7rMyFG8Br1OZcHwx7-wsA)
authorsos22@labyrinth.cl.cam.ac.uk <sos22@labyrinth.cl.cam.ac.uk>
Fri, 4 Jul 2003 10:43:09 +0000 (10:43 +0000)
committersos22@labyrinth.cl.cam.ac.uk <sos22@labyrinth.cl.cam.ac.uk>
Fri, 4 Jul 2003 10:43:09 +0000 (10:43 +0000)
Misc. bug fixes.

.rootkeys
BitKeeper/etc/ignore
xen/common/domain.c
xen/drivers/block/xen_block.c
xen/drivers/block/xen_physdisk.c
xen/include/xeno/physdisk.h [new file with mode: 0644]

index f88f1482ca0c85eba582421365afe2ef476e5ec0..2c7e58bb55a4b17ac295435e9f4eea29760575c5 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
 3ddb79c0MOVXq8qZDQRGb6z64_xAwg xen/include/xeno/pci_ids.h
 3e54c38dlSCVdyVM4PKcrSfzLLxWUQ xen/include/xeno/perfc.h
 3e54c38de9SUSYSAwxDf_DwkpAnQFA xen/include/xeno/perfc_defn.h
+3f055a3dwldYR102YcSuBaxIf9t3Jw xen/include/xeno/physdisk.h
 3ddb79c04nQVR3EYM5L4zxDV_MCo1g xen/include/xeno/prefetch.h
 3e4540ccU1sgCx8seIMGlahmMfv7yQ xen/include/xeno/reboot.h
 3ddb79c0LzqqS0LhAQ50ekgj4oGl7Q xen/include/xeno/sched.h
index 96401405cff57f54e12f72dbde6eb05d2892372e..119cbbb8b4c8233be1bd3d319d6d0f53568f5f7e 100644 (file)
@@ -419,3 +419,4 @@ xen/tools/figlet/figlet
 xenolinux-2.4.16-sparse/arch/xeno/drivers/block/Makefile.orig
 xenolinux-2.4.16-sparse/arch/xeno/drivers/block/block.c.orig
 xenolinux-2.4.16-sparse/scripts/kconfig.tk
+xen/include/xeno/physdisk.h~
index 00edab32feebc5210c0a337d8f84908a29e7ea7c..d52835017e78aeb6018d12c88775cd0d44cea20e 100644 (file)
@@ -16,6 +16,8 @@
 #include <asm/msr.h>
 #include <xeno/blkdev.h>
 #include <xeno/console.h>
+#include <hypervisor-ifs/block.h>
+#include <xeno/physdisk.h>
 
 /*
  * NB. No ring-3 access in initial guestOS pagetables. Note that we allow
index 91fa180e7d488a68e078bd972e8409aa6e5db5d0..ff7fd7b36cbe313cc101515f57707411010a2b1c 100644 (file)
@@ -18,6 +18,7 @@
 #include <xeno/interrupt.h>
 #include <xeno/segment.h>
 #include <xeno/slab.h>
+#include <xeno/physdisk.h>
 
 #if 0
 #define DPRINTK(_f, _a...) printk( _f , ## _a )
@@ -676,7 +677,7 @@ static void dispatch_rw_block_io(struct task_struct *p, int index)
                goto bad_descriptor;
            }
            if (p->domain != 0 &&
-               !xen_physdisk_access_okay(&phys_seg, p, operation)) {
+               !xen_physdisk_access_okay(&phys_seg[nr_psegs], p, operation)) {
              DPRINTK("access denied\n");
              /* XXX not quite right, but close enough. */
              goto bad_descriptor;
index 9061aef74630cf775156aca1f602f6d850aeabc7..8f81c4084bfcfe5ca52c8e753fce07cb94da2aa5 100644 (file)
@@ -6,6 +6,7 @@
 #include <asm/domain_page.h>
 #include <asm/io.h>
 #include <xeno/segment.h>
+#include <xeno/physdisk.h>
 
 #define MAX(a,b) ((a) > (b) ? (a) : (b))
 
@@ -84,7 +85,7 @@ static void xen_physdisk_revoke_access(unsigned short dev,
        ace_end <= start_sect)
       continue;
     
-    DPRINTK("Killing ace [%x, %x) against kill zone [%x, %x)\n",
+    DPRINTK("Killing ace [%lx, %lx) against kill zone [%lx, %lx)\n",
            cur_ace->start_sect, ace_end, start_sect, kill_zone_end);
 
     if (cur_ace->start_sect >= start_sect &&
@@ -234,7 +235,7 @@ int xen_physdisk_access_okay(phys_seg_t *pseg, struct task_struct *p,
   struct physdisk_ace *cur_ace;
   unsigned long sect;
 
-  DPRINTK("Checking access for domain %d, start sect %d, length %d.\n",
+  DPRINTK("Checking access for domain %d, start sect 0x%lx, length 0x%x.\n",
          p->domain, pseg->sector_number, pseg->nr_sects);
 
   for (sect = pseg->sector_number;
diff --git a/xen/include/xeno/physdisk.h b/xen/include/xeno/physdisk.h
new file mode 100644 (file)
index 0000000..fd234cf
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef PHYSDISK_ACES__
+#define PHYSDISK_ACES__
+
+struct task_struct;
+
+void destroy_physdisk_aces(struct task_struct *p);
+
+int xen_physdisk_grant(xp_disk_t *);
+int xen_physdisk_probe(physdisk_probebuf_t *);
+int xen_physdisk_access_okay(phys_seg_t *pseg, struct task_struct *p,
+                            int operation);
+
+#endif /* PHYSDISK_ACES__ */